<!doctype html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Ember todos - ibeginner</title>
    <link rel="stylesheet" href="__PUBLIC__/emberjs/libs/style.css">
  </head>
   
   
  <body>
  
  <script type="text/x-handlebars" data-template-name="todos/index">
  <ul id="todo-list">
    {{#each todo in model itemController="todo"}}
      <li {{bind-attr class="todo.isCompleted:completed todo.isEditing:editing"}}>
        {{#if todo.isEditing}}
          {{edit-todo class="edit" value=todo.title focus-out="acceptChanges" insert-newline="acceptChanges"}}
        {{else}}
          {{input type="checkbox" checked=todo.isCompleted class="toggle"}}
          <label {{action "editTodo" on="doubleClick"}}>{{todo.title}}</label><button {{action "removeTodo"}} class="destroy"></button>
        {{/if}}
      </li>
    {{/each}}
  </ul>
  </script>

  <script type="text/x-handlebars" data-template-name="todos">

  <section id="todoapp">
    <header id="header">
      <h1>My Todos</h1>
      {{input type="text" id="new-todo" placeholder="在这里输入您的事项，按 Enter 键即可保存。" 
              value=newTitle action="createTodo"}}
    </header>

      <section id="main">
      {{outlet}}
      {{input type="checkbox" id="toggle-all" checked=allAreDone}}
    </section>

      <footer id="footer">
        <span id="todo-count">
          <strong>{{remaining}}</strong>共 {{inflection}} 项</span>
            <ul id="filters">
                <li>
                  {{#link-to "todos.index" activeClass="selected"}}所有{{/link-to}}
                </li>
                <li>
                  {{#link-to "todos.active" activeClass="selected"}}未完成项{{/link-to}}
                </li>
                <li>
                  {{#link-to "todos.completed" activeClass="selected"}}完成项{{/link-to}}
                </li>
            </ul>

        {{#if hasCompleted}}
          <button id="clear-completed" {{action "clearCompleted"}}>
            清空完成项 ({{completed}})
          </button>
        {{/if}}
      </footer>
  </section>

  <footer id="info">
    <p>双击即可编辑&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.emberjs.cn/guides/getting-started/planning-the-application" target="_blank">帮助</a></p>
  </footer>
  
  </script>
  
  </body>
  
  <!--
  <script src="__PUBLIC__/emberjs/libs/jquery.min.js"></script>
  -->
    
  <script src="__PUBLIC__/FlatUI/js/vendor/jquery.min.js"></script>
  <script src="__PUBLIC__/emberjs/libs/handlebars.js"></script>
  <script src="__PUBLIC__/emberjs/libs/ember.js"></script>
  <script src="__PUBLIC__/emberjs/libs/ember-data.js"></script>
  
  <script src="__PUBLIC__/emberjs/libs/localstorage_adapter.js"></script>
  
  <script src="__PUBLIC__/emberjs/app/application.js"></script>
  <script src="__PUBLIC__/emberjs/app/router.js"></script>
  <script src="__PUBLIC__/emberjs/models/todo.js"></script>
  
  <script src="__PUBLIC__/emberjs/controllers/todos_controller.js"></script>
  <script src="__PUBLIC__/emberjs/controllers/todo_controller.js"></script>
  
  <script src="__PUBLIC__/emberjs/views/edit_todo_view.js"></script>

</html>